<template>
  <div class="home-banner">
    <XtxSlider :sliders="bannerList" />
  </div>
</template>

<script>
import { getBannerListAPI } from "@/api/home";
import { ref, onMounted } from "vue";
export default {
  name: "HomeBanner",
  setup() {
    const bannerList = ref([]);
    async function getBannerList() {
      const res = await getBannerListAPI();
      bannerList.value = res.result;
    }
    getBannerList();
    return {
      bannerList,
      getBannerList,
    };
  },
};
</script>

<style scoped lang='less'>
.home-banner {
  width: 1240px;
  height: 500px;
  position: absolute;
  left: 0;
  top: 0;
  z-index: 98;
}
</style>